//
//  List.m
//  盘盈贷1.2
//
//  Created by iOS on 15/3/6.
//  Copyright (c) 2015年 iOS. All rights reserved.
//

#import "List.h"

@implementation List
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"Id"]) {
        self.userid = key;
    }
}

- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}
- (instancetype)initWithDictionary:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
      
        self.userid = [dic objectForKey:@"Id"];
       //self.userid = [[dic objectForKey:@"Details"] objectForKey:@"Id"];
        self.Title = [dic objectForKey:@"Title"];
     
        self.Description = [[dic objectForKey:@"Loans"] objectForKey:@"Description"];
        self.Amount = [dic objectForKey:@"Amount"];
        self.LoanRate = [dic objectForKey:@"LoanRate"];
        self.PublishTime = [dic objectForKey:@"PublishTime"];
        self.Limit = [dic objectForKey:@"Limit"];
        self.BidAmount = [dic objectForKey:@"BidAmount"];
       
        self.LoanRealName = [dic objectForKey:@"LoanRealName"];
        self.FirstLimit = [dic objectForKey:@"FirstLimit"];
        self.FirstProduct = [dic objectForKey:@"FirstProduct"];
        self.BidRate = [dic objectForKey:@"BidRate"];
        self.Guarantee = [[dic objectForKey:@"RootProduct"] objectForKey:@"Guarantee"];
        self.IsHouseLoan = [dic objectForKey:@"IsHouseLoan"];
        self.IsCarLoan = [dic objectForKey:@"IsCarLoan"];
        self.IsGuaranteeLoan = [dic objectForKey:@"IsGuaranteeLoan"];
    }
    return self;
}

@end
